package com.ankiang.treeprint.lib;

import java.util.HashMap;
import java.util.Map;
import java.util.regex.Pattern;

public class Pinyin {

	static HashMap<String, String> jPinYin = new HashMap<>();

	/**
	 * 创建拼音与汉字对应表
	 * 映射【拼音->汉字】比【汉字->拼音】使用更少的空间
	 * 共收集了6771个汉字
	 * 未对多音字进行处理
	 * 不支持对多音字的识别
	 */
	public static void initial() {
		jPinYin.put("a", "啊阿锕");
		jPinYin.put("ai", "埃挨哎唉哀皑癌蔼矮艾碍爱隘诶捱嗳嗌嫒瑷暧砹锿霭");
		jPinYin.put("an", "鞍氨安俺按暗岸胺案谙埯揞犴庵桉铵鹌顸黯");
		jPinYin.put("ang", "肮昂盎");
		jPinYin.put("ao", "凹敖熬翱袄傲奥懊澳坳拗嗷噢岙廒遨媪骜聱螯鏊鳌鏖");
		jPinYin.put("ba", "芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸茇菝萆捭岜灞杷钯粑鲅魃");
		jPinYin.put("bai", "白柏百摆佰败拜稗薜掰鞴");
		jPinYin.put("ban", "斑班搬扳般颁板版扮拌伴瓣半办绊阪坂豳钣瘢癍舨");
		jPinYin.put("bang", "邦帮梆榜膀绑棒磅蚌镑傍谤蒡螃");
		jPinYin.put("bao", "苞胞包褒雹保堡饱宝抱报暴豹鲍爆勹葆宀孢煲鸨褓趵龅");
		jPinYin.put("bo", "剥薄玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳亳蕃啵饽檗擘礴钹鹁簸跛");
		jPinYin.put("bei", "杯碑悲卑北辈背贝钡倍狈备惫焙被孛陂邶埤蓓呗怫悖碚鹎褙鐾");
		jPinYin.put("ben", "奔苯本笨畚坌锛");
		jPinYin.put("beng", "崩绷甭泵蹦迸唪嘣甏");
		jPinYin.put("bi", "逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛匕仳俾芘荜荸吡哔狴庳愎滗濞弼妣婢嬖璧贲畀铋秕裨筚箅篦舭襞跸髀");
		jPinYin.put("bian", "鞭边编贬扁便变卞辨辩辫遍匾弁苄忭汴缏煸砭碥稹窆蝙笾鳊");
		jPinYin.put("biao", "标彪膘表婊骠飑飙飚灬镖镳瘭裱鳔");
		jPinYin.put("bie", "鳖憋别瘪蹩鳘");
		jPinYin.put("bin", "彬斌濒滨宾摈傧浜缤玢殡膑镔髌鬓");
		jPinYin.put("bing", "兵冰柄丙秉饼炳病并禀邴摒绠枋槟燹");
		jPinYin.put("bu", "捕卜哺补埠不布步簿部怖拊卟逋瓿晡钚醭");
		jPinYin.put("ca", "擦嚓礤");
		jPinYin.put("cai", "猜裁材才财睬踩采彩菜蔡");
		jPinYin.put("can", "餐参蚕残惭惨灿骖璨粲黪");
		jPinYin.put("cang", "苍舱仓沧藏伧");
		jPinYin.put("cao", "操糙槽曹草艹嘈漕螬艚");
		jPinYin.put("ce", "厕策侧册测刂帻恻");
		jPinYin.put("ceng", "层蹭噌");

		jPinYin.put("cha", "插叉茬茶查碴搽察岔差诧猹馇汊姹杈楂槎檫钗锸镲衩");
		jPinYin.put("chai", "拆柴豺侪茈瘥虿龇");
		jPinYin.put("chan", "搀掺蝉馋谗缠铲产阐颤冁谄谶蒇廛忏潺澶孱羼婵嬗骣觇禅镡裣蟾躔");
		jPinYin.put("chang", "昌猖场尝常长偿肠厂敞畅唱倡伥鬯苌菖徜怅惝阊娼嫦昶氅鲳");
		jPinYin.put("chao", "超抄钞朝嘲潮巢吵炒怊绉晁耖");
		jPinYin.put("che", "车扯撤掣彻澈坼屮砗");
		jPinYin.put("chen", "郴臣辰尘晨忱沉陈趁衬称谌抻嗔宸琛榇肜胂碜龀");
		jPinYin.put("cheng", "撑城橙成呈乘程惩澄诚承逞骋秤埕嵊徵浈枨柽樘晟塍瞠铖裎蛏酲");
		jPinYin.put("chi", "吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽傺墀芪茌搋叱哧啻嗤彳饬沲媸敕胝眙眵鸱瘛褫蚩螭笞篪豉踅踟魑");
		jPinYin.put("chong", "充冲虫崇宠茺忡憧铳艟");
		jPinYin.put("chou", "抽酬畴踌稠愁筹仇绸瞅丑俦圳帱惆溴妯瘳雠鲋");
		jPinYin.put("chu", "臭初出橱厨躇锄雏滁除楚础储矗搐触处亍刍憷绌杵楮樗蜍蹰黜");
		jPinYin.put("chuan", "揣川穿椽传船喘串掾舛惴遄巛氚钏镩舡");
		jPinYin.put("chuang", "疮窗幢床闯创怆");
		jPinYin.put("chui", "吹炊捶锤垂陲棰槌");
		jPinYin.put("chun", "春椿醇唇淳纯蠢促莼沌肫朐鹑蝽");
		jPinYin.put("chuo", "戳绰蔟辶辍镞踔龊");
		jPinYin.put("ci", "疵茨磁雌辞慈瓷词此刺赐次荠呲嵯鹚螅糍趑");
		jPinYin.put("cong", "聪葱囱匆从丛偬苁淙骢琮璁枞");
		jPinYin.put("cu", "凑粗醋簇猝殂蹙");
		jPinYin.put("cuan", "蹿篡窜汆撺昕爨");
		jPinYin.put("cui", "摧崔催脆瘁粹淬翠萃悴璀榱隹");
		jPinYin.put("cun", "村存寸磋忖皴");
		jPinYin.put("cuo", "撮搓措挫错厝脞锉矬痤鹾蹉躜");
		jPinYin.put("da", "搭达答瘩打大耷哒嗒怛妲疸褡笪靼鞑");
		jPinYin.put("dai", "呆歹傣戴带殆代贷袋待逮怠埭甙呔岱迨逯骀绐玳黛");
		jPinYin.put("dan", "耽担丹单郸掸胆旦氮但惮淡诞弹蛋亻儋卩萏啖澹檐殚赕眈瘅聃箪");
		jPinYin.put("dang", "当挡党荡档谠凼菪宕砀铛裆");
		jPinYin.put("dao", "刀捣蹈倒岛祷导到稻悼道盗叨啁忉洮氘焘忑纛");
		jPinYin.put("de", "德得的锝");
		jPinYin.put("deng", "蹬灯登等瞪凳邓噔嶝戥磴镫簦");
		jPinYin.put("di", "堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔氐籴诋谛邸坻莜荻嘀娣柢棣觌砥碲睇镝羝骶");
		jPinYin.put("dian", "颠掂滇碘点典靛垫电佃甸店惦奠淀殿丶阽坫埝巅玷癜癫簟踮");
		jPinYin.put("diao", "碉叼雕凋刁掉吊钓调轺铞蜩粜貂");
		jPinYin.put("die", "跌爹碟蝶迭谍叠佚垤堞揲喋渫轶牒瓞褶耋蹀鲽鳎");
		jPinYin.put("ding", "丁盯叮钉顶鼎锭定订丢仃啶玎腚碇町铤疔耵酊");
		jPinYin.put("dong", "东冬董懂动栋侗恫冻洞垌咚岽峒夂氡胨胴硐鸫");
		jPinYin.put("dou", "兜抖斗陡豆逗痘蔸钭窦窬蚪篼酡");
		jPinYin.put("du", "都督毒犊独读堵睹赌杜镀肚度渡妒芏嘟渎椟橐牍蠹笃髑黩");
		jPinYin.put("duan", "端短锻段断缎彖椴煅簖");
		jPinYin.put("dui", "堆兑队对怼憝碓");
		jPinYin.put("dun", "墩吨蹲敦顿囤钝盾遁炖砘礅盹镦趸");
		jPinYin.put("duo", "掇哆多夺垛躲朵跺舵剁惰堕咄哚缍柁铎裰踱");
		jPinYin.put("e", "蛾峨鹅俄额讹娥恶厄扼遏鄂饿噩谔垩垭苊莪萼呃愕屙婀轭曷腭硪锇锷鹗颚鳄");
		jPinYin.put("en", "恩蒽摁唔嗯");
		jPinYin.put("er", "而儿耳尔饵洱二贰迩珥铒鸸鲕");
		jPinYin.put("fa", "发罚筏伐乏阀法珐垡砝");
		jPinYin.put("fan", "藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛蘩幡犭梵攵燔畈蹯");
		jPinYin.put("fang", "坊芳方肪房防妨仿访纺放匚邡彷钫舫鲂");
		jPinYin.put("fei", "菲非啡飞肥匪诽吠肺废沸费芾狒悱淝妃绋绯榧腓斐扉祓砩镄痱蜚篚翡霏鲱");
		jPinYin.put("fen", "芬酚吩氛分纷坟焚汾粉奋份忿愤粪偾瀵棼愍鲼鼢");
		jPinYin.put("feng", "丰封枫蜂峰锋风疯烽逢冯缝讽奉凤俸酆葑沣砜");

		jPinYin.put("fu", "佛否夫敷肤孵扶拂辐幅氟符伏俘服浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐匐凫郛芙苻茯莩菔呋幞滏艴孚驸绂桴赙黻黼罘稃馥虍蚨蜉蝠蝮麸趺跗鳆");
		jPinYin.put("ga", "噶嘎蛤尬呷尕尜旮钆");
		jPinYin.put("gai", "该改概钙盖溉丐陔垓戤赅胲");
		jPinYin.put("gan", "干甘杆柑竿肝赶感秆敢赣坩苷尴擀泔淦澉绀橄旰矸疳酐");
		jPinYin.put("gang", "冈刚钢缸肛纲岗港戆罡颃筻");
		jPinYin.put("gong", "杠工攻功恭龚供躬公宫弓巩汞拱贡共蕻廾咣珙肱蚣蛩觥");
		jPinYin.put("gao", "篙皋高膏羔糕搞镐稿告睾诰郜蒿藁缟槔槁杲锆");
		jPinYin.put("ge", "哥歌搁戈鸽胳疙割革葛格阁隔铬个各鬲仡哿塥嗝纥搿膈硌铪镉袼颌虼舸骼髂");
		jPinYin.put("gei", "给");
		jPinYin.put("gen", "根跟亘茛哏艮");
		jPinYin.put("geng", "耕更庚羹埂耿梗哽赓鲠");
		jPinYin.put("gou", "钩勾沟苟狗垢构购够佝诟岣遘媾缑觏彀鸲笱篝鞲");
		jPinYin.put("gu", "辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇嘏诂菰哌崮汩梏轱牯牿胍臌毂瞽罟钴锢瓠鸪鹄痼蛄酤觚鲴骰鹘");
		jPinYin.put("gua", "刮瓜剐寡挂褂卦诖呱栝鸹");
		jPinYin.put("guai", "乖拐怪哙");
		jPinYin.put("guan", "棺关官冠观管馆罐惯灌贯倌莞掼涫盥鹳鳏");
		jPinYin.put("guang", "光广逛犷桄胱疒");
		jPinYin.put("gui", "瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽匦刿庋宄妫桧炅晷皈簋鲑鳜");
		jPinYin.put("gun", "辊滚棍丨衮绲磙鲧");
		jPinYin.put("guo", "锅郭国果裹过馘蠃埚掴呙囗帼崞猓椁虢锞聒蜮蜾蝈");
		jPinYin.put("ha", "哈");
		jPinYin.put("hai", "骸孩海氦亥害骇咴嗨颏醢");
		jPinYin.put("han", "酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉邗菡撖阚瀚晗焓颔蚶鼾");
		jPinYin.put("hen", "夯痕很狠恨");
		jPinYin.put("hang", "杭航沆绗珩桁");
		jPinYin.put("hao", "壕嚎豪毫郝好耗号浩薅嗥嚆濠灏昊皓颢蚝");
		jPinYin.put("he", "呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺诃劾壑藿嗑嗬阖盍蚵翮");
		jPinYin.put("hei", "嘿黑");
		jPinYin.put("heng", "哼亨横衡恒訇蘅");
		jPinYin.put("hong", "轰哄烘虹鸿洪宏弘红黉讧荭薨闳泓");
		jPinYin.put("hou", "喉侯猴吼厚候后堠後逅瘊篌糇鲎骺");
		jPinYin.put("hu", "呼乎忽瑚壶葫胡蝴狐糊湖弧虎唬护互沪户冱唿囫岵猢怙惚浒滹琥槲轷觳烀煳戽扈祜鹕鹱笏醐斛");
		jPinYin.put("hua", "花哗华猾滑画划化话劐浍骅桦铧稞");
		jPinYin.put("huai", "槐徊怀淮坏还踝");
		jPinYin.put("huan", "欢环桓缓换患唤痪豢焕涣宦幻郇奂垸擐圜洹浣漶寰逭缳锾鲩鬟");
		jPinYin.put("huang", "荒慌黄磺蝗簧皇凰惶煌晃幌恍谎隍徨湟潢遑璜肓癀蟥篁鳇");
		jPinYin.put("hui", "灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘诙茴荟蕙哕喙隳洄彗缋珲晖恚虺蟪麾");
		jPinYin.put("hun", "荤昏婚魂浑混诨馄阍溷缗");
		jPinYin.put("huo", "豁活伙火获或惑霍货祸攉嚯夥钬锪镬耠蠖");
		jPinYin.put("ji",
				"击圾基机畸稽积箕肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪居丌乩剞佶佴脔墼芨芰萁蒺蕺掎叽咭哜唧岌嵴洎彐屐骥畿玑楫殛戟戢赍觊犄齑矶羁嵇稷瘠瘵虮笈笄暨跻跽霁鲚鲫髻麂");
		jPinYin.put("jia", "嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁伽郏拮岬浃迦珈戛胛恝铗镓痂蛱笳袈跏");
		jPinYin.put("jian", "歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件健舰剑饯渐溅涧建僭谏谫菅蒹搛囝湔蹇謇缣枧柙楗戋戬牮犍毽腱睑锏鹣裥笕箴翦趼踺鲣鞯");
		jPinYin.put("jiang", "僵姜将浆江疆蒋桨奖讲匠酱降茳洚绛缰犟礓耩糨豇");
		jPinYin.put("jiao", "蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫佼僬茭挢噍峤徼姣纟敫皎鹪蛟醮跤鲛");
		jPinYin.put("jie", "窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届偈讦诘喈嗟獬婕孑桀獒碣锴疖袷颉蚧羯鲒骱髫");
		jPinYin.put("jin", "巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸尽卺荩堇噤馑廑妗缙瑾槿赆觐钅锓衿矜");
		jPinYin.put("jing", "劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净刭儆阱菁獍憬泾迳弪婧肼胫腈旌");
		jPinYin.put("jiong", "炯窘冂迥扃");
		jPinYin.put("jiu", "揪究纠玖韭久灸九酒厩救旧臼舅咎就疚僦啾阄柩桕鹫赳鬏");
		jPinYin.put("ju", "鞠拘狙疽驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧倨讵苣苴莒掬遽屦琚枸椐榘榉橘犋飓钜锔窭裾趄醵踽龃雎鞫");
		jPinYin.put("juan", "捐鹃娟倦眷卷绢鄄狷涓桊蠲锩镌隽");
		jPinYin.put("jue", "撅攫抉掘倔爵觉决诀绝厥劂谲矍蕨噘崛獗孓珏桷橛爝镢蹶觖");
		jPinYin.put("jun", "均菌钧军君峻俊竣浚郡骏捃狻皲筠麇");
		jPinYin.put("ka", "喀咖卡佧咔胩");

		jPinYin.put("ke", "咯坷苛柯棵磕颗科壳咳可渴克刻客课岢恪溘骒缂珂轲氪瞌钶疴窠蝌髁");
		jPinYin.put("kai", "开揩楷凯慨剀垲蒈忾恺铠锎");
		jPinYin.put("kan", "刊堪勘坎砍看侃凵莰莶戡龛瞰");
		jPinYin.put("kang", "康慷糠扛抗亢炕坑伉闶钪");
		jPinYin.put("kao", "考拷烤靠尻栲犒铐");
		jPinYin.put("ken", "肯啃垦恳垠裉颀");
		jPinYin.put("keng", "吭忐铿");
		jPinYin.put("kong", "空恐孔控倥崆箜");
		jPinYin.put("kou", "抠口扣寇芤蔻叩眍筘");
		jPinYin.put("ku", "枯哭窟苦酷库裤刳堀喾绔骷");
		jPinYin.put("kua", "夸垮挎跨胯侉");
		jPinYin.put("kuai", "块筷侩快蒯郐蒉狯脍");
		jPinYin.put("kuan", "宽款髋");
		jPinYin.put("kuang", "匡筐狂框矿眶旷况诓诳邝圹夼哐纩贶");
		jPinYin.put("kui", "亏盔岿窥葵奎魁傀馈愧溃馗匮夔隗揆喹喟悝愦阕逵暌睽聩蝰篑臾跬");
		jPinYin.put("kun", "坤昆捆困悃阃琨锟醌鲲髡");
		jPinYin.put("kuo", "括扩廓阔蛞");
		jPinYin.put("la", "垃拉喇蜡腊辣啦剌摺邋旯砬瘌");
		jPinYin.put("lai", "莱来赖崃徕涞濑赉睐铼癞籁");
		jPinYin.put("lan", "蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥啉岚懔漤榄斓罱镧褴");
		jPinYin.put("lang", "琅榔狼廊郎朗浪莨蒗啷阆锒稂螂");
		jPinYin.put("lao", "捞劳牢老佬姥酪烙涝唠崂栳铑铹痨醪");
		jPinYin.put("le", "勒乐肋仂叻嘞泐鳓");
		jPinYin.put("lei", "雷镭蕾磊累儡垒擂类泪羸诔荽咧漯嫘缧檑耒酹");
		jPinYin.put("ling", "棱冷拎玲菱零龄铃伶羚凌灵陵岭领另令酃塄苓呤囹泠绫柃棂瓴聆蛉翎鲮");
		jPinYin.put("leng", "楞愣");
		jPinYin.put("li", "厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐痢立粒沥隶力璃哩俪俚郦坜苈莅蓠藜捩呖唳喱猁溧澧逦娌嫠骊缡珞枥栎轹戾砺詈罹锂鹂疠疬蛎蜊蠡笠篥粝醴跞雳鲡鳢黧");
		jPinYin.put("lian", "俩联莲连镰廉怜涟帘敛脸链恋炼练挛蔹奁潋濂娈琏楝殓臁膦裢蠊鲢");
		jPinYin.put("liang", "粮凉梁粱良两辆量晾亮谅墚椋踉靓魉");
		jPinYin.put("liao", "撩聊僚疗燎寥辽潦了撂镣廖料蓼尥嘹獠寮缭钌鹩耢");
		jPinYin.put("lie", "列裂烈劣猎冽埒洌趔躐鬣");
		jPinYin.put("lin", "琳林磷霖临邻鳞淋凛赁吝蔺嶙廪遴檩辚瞵粼躏麟");
		jPinYin.put("liu", "溜琉榴硫馏留刘瘤流柳六抡偻蒌泖浏遛骝绺旒熘锍镏鹨鎏");
		jPinYin.put("long", "龙聋咙笼窿隆垄拢陇弄垅茏泷珑栊胧砻癃");
		jPinYin.put("lou", "楼娄搂篓漏陋喽嵝镂瘘耧蝼髅");
		jPinYin.put("lu", "芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮垆摅撸噜泸渌漉璐栌橹轳辂辘氇胪镥鸬鹭簏舻鲈");
		jPinYin.put("lv", "驴吕铝侣旅履屡缕虑氯律率滤绿捋闾榈膂稆褛");
		jPinYin.put("luan", "峦孪滦卵乱栾鸾銮");
		jPinYin.put("lue", "掠略锊");
		jPinYin.put("lun", "轮伦仑沦纶论囵");
		jPinYin.put("luo", "萝螺罗逻锣箩骡裸落洛骆络倮荦摞猡泺椤脶镙瘰雒");
		jPinYin.put("ma", "妈麻玛码蚂马骂嘛吗唛犸嬷杩麽");
		jPinYin.put("mai", "埋买麦卖迈脉劢荬咪霾");
		jPinYin.put("man", "瞒馒蛮满蔓曼慢漫谩墁幔缦熳镘颟螨鳗鞔");
		jPinYin.put("mang", "芒茫盲忙莽邙漭朦硭蟒");
		jPinYin.put("meng", "氓萌蒙檬盟锰猛梦孟勐甍瞢懵礞虻蜢蠓艋艨黾");
		jPinYin.put("miao", "猫苗描瞄藐秒渺庙妙喵邈缈缪杪淼眇鹋蜱");
		jPinYin.put("mao", "茅锚毛矛铆卯茂冒帽貌贸侔袤勖茆峁瑁昴牦耄旄懋瞀蛑蝥蟊髦");
		jPinYin.put("me", "么");
		jPinYin.put("mei", "玫枚梅酶霉煤没眉媒镁每美昧寐妹媚坶莓嵋猸浼湄楣镅鹛袂魅");
		jPinYin.put("men", "门闷们扪玟焖懑钔");
		jPinYin.put("mi", "眯醚靡糜迷谜弥米秘觅泌蜜密幂芈冖谧蘼嘧猕獯汨宓弭脒敉糸縻麋");
		jPinYin.put("mian", "棉眠绵冕免勉娩缅面沔湎腼眄");
		jPinYin.put("mie", "蔑灭咩蠛篾");
		jPinYin.put("min", "民抿皿敏悯闽苠岷闵泯珉");
		jPinYin.put("ming", "明螟鸣铭名命冥茗溟暝瞑酩");
		jPinYin.put("miu", "谬");
		jPinYin.put("mo", "摸摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谟茉蓦馍嫫镆秣瘼耱蟆貊貘");
		jPinYin.put("mou", "谋牟某厶哞婺眸鍪");
		jPinYin.put("mu", "拇牡亩姆母墓暮幕募慕木目睦牧穆仫苜呒沐毪钼");
		jPinYin.put("na", "拿哪呐钠那娜纳捺肭镎衲箬");
		jPinYin.put("nai", "氖乃奶耐奈鼐艿萘柰");
		jPinYin.put("nan", "南男难囊喃囡楠腩蝻赧");
		jPinYin.put("nao", "挠脑恼闹孬垴猱瑙硇铙蛲");
		jPinYin.put("ne", "淖呢讷");
		jPinYin.put("nei", "内馁");
		jPinYin.put("nen", "嫩能枘恁");
		jPinYin.put("ni", "妮霓倪泥尼拟你匿腻逆溺伲坭猊怩滠昵旎祢慝睨铌鲵");
		jPinYin.put("nian", "蔫拈年碾撵捻念廿辇黏鲇鲶");
		jPinYin.put("niang", "娘酿");
		jPinYin.put("niao", "鸟尿茑嬲脲袅");
		jPinYin.put("nie", "捏聂孽啮镊镍涅乜陧蘖嗫肀颞臬蹑");
		jPinYin.put("nin", "您柠");
		jPinYin.put("ning", "狞凝宁拧泞佞蓥咛甯聍");
		jPinYin.put("niu", "牛扭钮纽狃忸妞蚴");
		jPinYin.put("nong", "脓浓农侬");
		jPinYin.put("nu", "奴努怒呶帑弩胬孥驽");
		jPinYin.put("nv", "女恧钕衄");
		jPinYin.put("nuan", "暖");
		jPinYin.put("nuenue", "虐");
		jPinYin.put("nue", "疟谑");
		jPinYin.put("nuo", "挪懦糯诺傩搦喏锘");
		jPinYin.put("ou", "哦欧鸥殴藕呕偶沤怄瓯耦");
		jPinYin.put("pa", "啪趴爬帕怕琶葩筢");
		jPinYin.put("pai", "拍排牌徘湃派俳蒎");
		jPinYin.put("pan", "攀潘盘磐盼畔判叛爿泮袢襻蟠蹒");
		jPinYin.put("pang", "乓庞旁耪胖滂逄");
		jPinYin.put("pao", "抛咆刨炮袍跑泡匏狍庖脬疱");
		jPinYin.put("pei", "呸胚培裴赔陪配佩沛掊辔帔淠旆锫醅霈");
		jPinYin.put("pen", "喷盆湓");

		jPinYin.put("peng", "砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯堋嘭怦蟛");
		jPinYin.put("pi", "砒霹批披劈琵毗啤脾疲皮匹痞僻屁譬丕陴邳郫圮鼙擗噼庀媲纰枇甓睥罴铍痦癖疋蚍貔");
		jPinYin.put("pian", "篇偏片骗谝骈犏胼褊翩蹁");
		jPinYin.put("piao", "飘漂瓢票剽嘌嫖缥殍瞟螵");
		jPinYin.put("pie", "撇瞥丿苤氕");
		jPinYin.put("pin", "拼频贫品聘拚姘嫔榀牝颦");
		jPinYin.put("ping", "乒坪苹萍平凭瓶评屏俜娉枰鲆");
		jPinYin.put("po", "坡泼颇婆破魄迫粕叵鄱溥珀钋钷皤笸");
		jPinYin.put("pou", "剖裒踣");
		jPinYin.put("pu", "扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑匍噗濮璞氆镤镨蹼");
		jPinYin.put("qi", "期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫亟亓圻芑萋葺嘁屺岐汔淇骐绮琪琦杞桤槭欹祺憩碛蛴蜞綦綮趿蹊鳍麒");
		jPinYin.put("qia", "掐恰洽葜");
		jPinYin.put("qian", "牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉佥阡芊芡荨掮岍悭慊骞搴褰缱椠肷愆钤虔箝");
		jPinYin.put("qiang", "枪呛腔羌墙蔷强抢嫱樯戗炝锖锵镪襁蜣羟跫跄");
		jPinYin.put("qiao", "橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍劁诮谯荞愀憔缲樵毳硗跷鞒");
		jPinYin.put("qie", "切茄且怯窃郄唼惬妾挈锲箧");
		jPinYin.put("qin", "钦侵亲秦琴勤芹擒禽寝沁芩蓁蕲揿吣嗪噙溱檎螓衾");
		jPinYin.put("qing", "青轻氢倾卿清擎晴氰情顷请庆倩苘圊檠磬蜻罄箐謦鲭黥");
		jPinYin.put("qiong", "琼穷邛茕穹筇銎");
		jPinYin.put("qiu", "秋丘邱球求囚酋泅俅氽巯艽犰湫逑遒楸赇鸠虬蚯蝤裘糗鳅鼽");
		jPinYin.put("qu", "趋区蛆曲躯屈驱渠取娶龋趣去诎劬蕖蘧岖衢阒璩觑氍祛磲癯蛐蠼麴瞿黢");
		jPinYin.put("quan", "圈颧权醛泉全痊拳犬券劝诠荃獾悛绻辁畎铨蜷筌鬈");
		jPinYin.put("que", "缺炔瘸却鹊榷确雀阙悫");
		jPinYin.put("qun", "裙群逡");
		jPinYin.put("ran", "然燃冉染苒髯");
		jPinYin.put("rang", "瓤壤攘嚷让禳穰");
		jPinYin.put("rao", "饶扰绕荛娆桡");
		jPinYin.put("ruo", "惹若弱");
		jPinYin.put("re", "热偌");
		jPinYin.put("ren", "壬仁人忍韧任认刃妊纫仞荏葚饪轫稔衽");
		jPinYin.put("reng", "扔仍");
		jPinYin.put("ri", "日");
		jPinYin.put("rong", "戎茸蓉荣融熔溶容绒冗嵘狨缛榕蝾");
		jPinYin.put("rou", "揉柔肉糅蹂鞣");
		jPinYin.put("ru", "茹蠕儒孺如辱乳汝入褥蓐薷嚅洳溽濡铷襦颥");
		jPinYin.put("ruan", "软阮朊");
		jPinYin.put("rui", "蕊瑞锐芮蕤睿蚋");
		jPinYin.put("run", "闰润");
		jPinYin.put("sa", "撒洒萨卅仨挲飒");
		jPinYin.put("sai", "腮鳃塞赛噻");
		jPinYin.put("san", "三叁伞散彡馓氵毵糁霰");
		jPinYin.put("sang", "桑嗓丧搡磉颡");
		jPinYin.put("sao", "搔骚扫嫂埽臊瘙鳋");
		jPinYin.put("se", "瑟色涩啬铩铯穑");
		jPinYin.put("sen", "森");
		jPinYin.put("seng", "僧");
		jPinYin.put("sha", "莎砂杀刹沙纱傻啥煞脎歃痧裟霎鲨");
		jPinYin.put("shai", "筛晒酾");
		jPinYin.put("shan", "珊苫杉山删煽衫闪陕擅赡膳善汕扇缮剡讪鄯埏芟潸姗骟膻钐疝蟮舢跚鳝");
		jPinYin.put("shang", "墒伤商赏晌上尚裳垧绱殇熵觞");
		jPinYin.put("shao", "梢捎稍烧芍勺韶少哨邵绍劭苕潲蛸笤筲艄");
		jPinYin.put("she", "奢赊蛇舌舍赦摄射慑涉社设厍佘猞畲麝");
		jPinYin.put("shen", "砷申呻伸身深娠绅神沈审婶甚肾慎渗诜谂吲哂渖椹矧蜃");
		jPinYin.put("sheng", "声生甥牲升绳省盛剩胜圣丞渑媵眚笙");
		jPinYin.put("shi", "师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试谥埘莳蓍弑唑饣轼耆贳炻礻铈*屏蔽的关键字*螫舐筮豕鲥鲺");
		jPinYin.put("shou", "收手首守寿授售受瘦兽扌狩绶艏");
		jPinYin.put("shu", "蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱恕倏塾菽忄沭涑澍姝纾毹腧殳镯秫鹬");
		jPinYin.put("shua", "刷耍唰涮");
		jPinYin.put("shuai", "摔衰甩帅蟀");
		jPinYin.put("shuan", "栓拴闩");
		jPinYin.put("shuang", "霜双爽孀");
		jPinYin.put("shui", "谁水睡税");
		jPinYin.put("shun", "吮瞬顺舜恂");
		jPinYin.put("shuo", "说硕朔烁蒴搠嗍濯妁槊铄");
		jPinYin.put("si", "斯撕嘶思私司丝死肆寺嗣四伺似饲巳厮俟兕菥咝汜泗澌姒驷缌祀祠锶鸶耜蛳笥");
		jPinYin.put("song", "松耸怂颂送宋讼诵凇菘崧嵩忪悚淞竦");
		jPinYin.put("sou", "搜艘擞嗽叟嗖嗾馊溲飕瞍锼螋");
		jPinYin.put("su", "苏酥俗素速粟僳塑溯宿诉肃夙谡蔌嗉愫簌觫稣");
		jPinYin.put("suan", "酸蒜算");
		jPinYin.put("sui", "虽隋随绥髓碎岁穗遂隧祟蓑冫谇濉邃燧眭睢");
		jPinYin.put("sun", "孙损笋荪狲飧榫跣隼");
		jPinYin.put("suo", "梭唆缩琐索锁所唢嗦娑桫睃羧");
		jPinYin.put("ta", "塌他它她塔獭挞蹋踏闼溻遢榻沓");
		jPinYin.put("tai", "胎苔抬台泰酞太态汰邰薹肽炱钛跆鲐");
		jPinYin.put("tan", "坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭郯蕈昙钽锬覃");
		jPinYin.put("tang", "汤塘搪堂棠膛唐糖傥饧溏瑭铴镗耥螗螳羰醣");
		jPinYin.put("thang", "倘躺淌");
		jPinYin.put("theng", "趟烫");
		jPinYin.put("tao", "掏涛滔绦萄桃逃淘陶讨套挑鼗啕韬饕");
		jPinYin.put("te", "特");
		jPinYin.put("teng", "藤腾疼誊滕");
		jPinYin.put("ti", "梯剔踢锑提题蹄啼体替嚏惕涕剃屉荑悌逖绨缇鹈裼醍");
		jPinYin.put("tian", "天添填田甜恬舔腆掭忝阗殄畋钿蚺");
		jPinYin.put("tiao", "条迢眺跳佻祧铫窕龆鲦");
		jPinYin.put("tie", "贴铁帖萜餮");
		jPinYin.put("ting", "厅听烃汀廷停亭庭挺艇莛葶婷梃蜓霆");
		jPinYin.put("tong", "通桐酮瞳同铜彤童桶捅筒统痛佟僮仝茼嗵恸潼砼");
		jPinYin.put("tou", "偷投头透亠");
		jPinYin.put("tu", "凸秃突图徒途涂屠土吐兔堍荼菟钍酴");
		jPinYin.put("tuan", "湍团疃");
		jPinYin.put("tui", "推颓腿蜕褪退忒煺");
		jPinYin.put("tun", "吞屯臀饨暾豚窀");
		jPinYin.put("tuo", "拖托脱鸵陀驮驼椭妥拓唾乇佗坨庹沱柝砣箨舄跎鼍");
		jPinYin.put("wa", "挖哇蛙洼娃瓦袜佤娲腽");
		jPinYin.put("wai", "歪外");
		jPinYin.put("wan", "豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕剜芄苋菀纨绾琬脘畹蜿箢");
		jPinYin.put("wang", "汪王亡枉网往旺望忘妄罔尢惘辋魍");
		jPinYin.put("wei", "威巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫倭偎诿隈葳薇帏帷崴嵬猥猬闱沩洧涠逶娓玮韪軎炜煨熨痿艉鲔");
		jPinYin.put("wen", "瘟温蚊文闻纹吻稳紊问刎愠阌汶璺韫殁雯");
		jPinYin.put("weng", "嗡翁瓮蓊蕹");
		jPinYin.put("wo", "挝蜗涡窝我斡卧握沃莴幄渥杌肟龌");
		jPinYin.put("wu", "巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误兀仵阢邬圬芴庑怃忤浯寤迕妩骛牾焐鹉鹜蜈鋈鼯");
		jPinYin.put("xi", "昔熙析西硒矽晰嘻吸锡牺稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细僖兮隰郗茜葸蓰奚唏徙饩阋浠淅屣嬉玺樨曦觋欷熹禊禧钸皙穸蜥蟋舾羲粞翕醯鼷");
		jPinYin.put("xia", "瞎虾匣霞辖暇峡侠狭下厦夏吓掀葭嗄狎遐瑕硖瘕罅黠");
		jPinYin.put("xian", "锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线冼藓岘猃暹娴氙祆鹇痫蚬筅籼酰跹");
		jPinYin.put("xiang", "相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象芗葙饷庠骧缃蟓鲞飨");
		jPinYin.put("xiao", "萧硝霄削哮嚣销消宵淆晓小孝校肖啸笑效哓咻崤潇逍骁绡枭枵筱箫魈");
		jPinYin.put("xie", "楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑偕亵勰燮薤撷廨瀣邂绁缬榭榍歙躞");
		jPinYin.put("xin", "薪芯锌欣辛新忻心信衅囟馨莘歆铽鑫");
		jPinYin.put("xing", "星腥猩惺兴刑型形邢行醒幸杏性姓陉荇荥擤悻硎");
		jPinYin.put("xiong", "兄凶胸匈汹雄熊芎");
		jPinYin.put("xiu", "休修羞朽嗅锈秀袖绣莠岫馐庥鸺貅髹");
		jPinYin.put("xu", "墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续讴诩圩蓿怵洫溆顼栩煦砉盱胥糈醑");
		jPinYin.put("xuan", "轩喧宣悬旋玄选癣眩绚儇谖萱揎馔泫洵渲漩璇楦暄炫煊碹铉镟痃");
		jPinYin.put("xue", "靴薛学穴雪血噱泶鳕");
		jPinYin.put("xun", "勋熏循旬询寻驯巡殉汛训讯逊迅巽埙荀薰峋徇浔曛窨醺鲟");
		jPinYin.put("ya", "压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶伢揠吖岈迓娅琊桠氩砑睚痖");
		jPinYin.put("yan", "焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验厣靥赝俨偃兖讠谳郾鄢芫菸崦恹闫阏洇湮滟妍嫣琰晏胭腌焱罨筵酽魇餍鼹");
		jPinYin.put("yang", "殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾徉怏泱炀烊恙蛘鞅");
		jPinYin.put("yao", "邀腰妖瑶摇尧遥窑谣姚咬舀药要耀夭爻吆崾徭瀹幺珧杳曜肴鹞窈繇鳐");
		jPinYin.put("ye", "椰噎耶爷野冶也页掖业叶曳腋夜液谒邺揶馀晔烨铘");
		jPinYin.put("yi",
				"一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎刈劓佾诒圪圯埸懿苡薏弈奕挹弋呓咦咿噫峄嶷猗饴怿怡悒漪迤驿缢殪贻旖熠钇镒镱痍瘗癔翊衤蜴舣羿翳酏黟");
		jPinYin.put("yin", "茵荫因殷音阴姻吟银淫寅饮尹引隐印胤鄞堙茚喑狺夤氤铟瘾蚓霪龈");
		jPinYin.put("ying", "英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映嬴郢茔莺萦撄嘤膺滢潆瀛瑛璎楹鹦瘿颍罂");
		jPinYin.put("yo", "哟唷");
		jPinYin.put("yong", "拥佣臃痈庸雍踊蛹咏泳涌永恿勇用俑壅墉慵邕镛甬鳙饔");
		jPinYin.put("you", "幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼卣攸侑莸呦囿宥柚猷牖铕疣蝣鱿黝鼬");
		jPinYin.put("yu", "迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉浴寓裕预豫驭禺毓伛俣谀谕萸蓣揄喁圄圉嵛狳饫庾阈妪妤纡瑜昱觎腴欤於煜燠聿钰鹆瘐瘀窳蝓竽舁雩龉");
		jPinYin.put("yuan", "鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院塬沅媛瑗橼爰眢鸢螈鼋");
		jPinYin.put("yue", "曰约越跃钥岳粤月悦阅龠樾刖钺");
		jPinYin.put("yun", "耘云郧匀陨允运蕴酝晕韵孕郓芸狁恽纭殒昀氲");
		jPinYin.put("za", "匝砸杂拶咂");
		jPinYin.put("zai", "栽哉灾宰载再在咱崽甾");
		jPinYin.put("zan", "攒暂赞瓒昝簪糌趱錾");
		jPinYin.put("zang", "赃脏葬奘戕臧");
		jPinYin.put("zao", "遭糟凿藻枣早澡蚤躁噪造皂灶燥唣缫");
		jPinYin.put("ze", "责择则泽仄赜啧迮昃笮箦舴");
		jPinYin.put("zei", "贼");
		jPinYin.put("zen", "怎谮");
		jPinYin.put("zeng", "增憎曾赠缯甑罾锃");
		jPinYin.put("zha", "扎喳渣札轧铡闸眨栅榨咋乍炸诈揸吒咤哳怍砟痄蚱齄");
		jPinYin.put("zhai", "摘斋宅窄债寨砦");
		jPinYin.put("zhan", "瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽谵搌旃");
		jPinYin.put("zhang", "樟章彰漳张掌涨杖丈帐账仗胀瘴障仉鄣幛嶂獐嫜璋蟑");
		jPinYin.put("zhao", "招昭找沼赵照罩兆肇召爪诏棹钊笊");
		jPinYin.put("zhe", "遮折哲蛰辙者锗蔗这浙谪陬柘辄磔鹧褚蜇赭");
		jPinYin.put("zhen", "珍斟真甄砧臻贞针侦枕疹诊震振镇阵缜桢榛轸赈胗朕祯畛鸩");
		jPinYin.put("zheng", "蒸挣睁征狰争怔整拯正政帧症郑证诤峥钲铮筝");
		jPinYin.put("zhi", "芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒卮陟郅埴芷摭帙忮彘咫骘栉枳栀桎轵轾攴贽膣祉祗黹雉鸷痣蛭絷酯跖踬踯豸觯");
		jPinYin.put("zhong", "中盅忠钟衷终种肿重仲众冢锺螽舂舯踵");
		jPinYin.put("zhou", "舟周州洲诌粥轴肘帚咒皱宙昼骤啄着倜诹荮鬻纣胄碡籀舳酎鲷");
		jPinYin.put("zhu", "珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑住注祝驻伫侏邾苎茱洙渚潴驺杼槠橥炷铢疰瘃蚰竺箸翥躅麈");
		jPinYin.put("zhua", "抓");
		jPinYin.put("zhuai", "拽");
		jPinYin.put("zhuan", "专砖转撰赚篆抟啭颛");
		jPinYin.put("zhuang", "桩庄装妆撞壮状丬");
		jPinYin.put("zhui", "椎锥追赘坠缀萑骓缒");
		jPinYin.put("zhun", "谆准");
		jPinYin.put("zhuo", "捉拙卓桌琢茁酌灼浊倬诼廴蕞擢啜浞涿杓焯禚斫");
		jPinYin.put("zi", "兹咨资姿滋淄孜紫仔籽滓子自渍字谘嵫姊孳缁梓辎赀恣眦锱秭耔笫粢觜訾鲻髭");
		jPinYin.put("zong", "鬃棕踪宗综总纵腙粽");
		jPinYin.put("zou", "邹走奏揍鄹鲰");
		jPinYin.put("zu", "租足卒族祖诅阻组俎菹啐徂驵蹴");
		jPinYin.put("zuan", "钻纂攥缵");
		jPinYin.put("zui", "嘴醉最罪");
		jPinYin.put("zun", "尊遵撙樽鳟");
		jPinYin.put("zuo", "昨左佐柞做作坐座阝阼胙祚酢");
		jPinYin.put("cou", "薮楱辏腠");
		jPinYin.put("nang", "攮哝囔馕曩");
		jPinYin.put("o", "喔");
		jPinYin.put("dia", "嗲");
		jPinYin.put("chuai", "嘬膪踹");
		jPinYin.put("cen", "岑涔");
		jPinYin.put("diu", "铥");
		jPinYin.put("nou", "耨");
		jPinYin.put("fou", "缶");
		jPinYin.put("bia", "髟");
	}

	static {
		initial();
	}

	/**
	 * 把汉字转成首字母大写的拼音
	 * 
	 * @param strHanzi
	 * @return
	 */
	public static String hanziToPinyin(String strHanzi) {
		int len = strHanzi.length();
		String result = "";
		String reg = "[a-zA-Z0-9\\- ]";
		for (int i = 0; i < len; i++) {
			String val = strHanzi.substring(i, i + 1);
			String name = arraySearch(val, jPinYin);

			Pattern p = Pattern.compile(reg);
			if (p.matcher(val).matches()) {
				result += val;
			} else if (name != null && !"".equals(name)) {
				result += name;
			} else {
				result += val;
			}

		}

		// // 空格替换成-，--替换成-
		// result = result.replace(" ", "-");
		// while (result.indexOf("--") > 0) {
		// result = result.replace("--", "-");
		// }
		return result;
	}

	/**
	 * 从map里查找汉字的拼音
	 * 
	 * @param key
	 * @param arr
	 * @return
	 */
	private static String arraySearch(String key, Map<String, String> arr) {
		for (String name : arr.keySet()) {
			if (arr.get(name).indexOf(key) != -1) {
				return ucFirst(name);
			}
		}
		return "";
	}

	/**
	 * 將拼音的第一个字母变成大写
	 * 
	 * @param pinyin
	 * @return
	 */
	private static String ucFirst(String pinyin) {
		if (pinyin.length() > 0) {
			String first = pinyin.substring(0, 1).toUpperCase();
			String left = pinyin.substring(1);
			return first + left;
		}
		return "";
	}

	public static String extractUCChar(String pinyin){
		if(pinyin == null){
			return "";
		}
		String res = "";
		for(int i=0;i<pinyin.length();i++){
			char ch = pinyin.charAt(i);
			if(Character.isUpperCase(ch) && Character.isLetter(ch)){
				res += ch;
			}
		}
		return res;
	}

}
